import java.util.Calendar;
import java.util.Timer;
import java.util.TimerTask;

// 程序入口
public class Main {
    public static void main(String[] args) throws Exception {
        // 启动定时器
        Timer timer = new Timer();
        // 设置启动时间
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.DATE, cal.get(cal.DATE)+1);
        cal.set(Calendar.HOUR_OF_DAY, 2);
        cal.set(Calendar.MINUTE, 0);
        cal.set(Calendar.SECOND, 0);
//        System.out.println(cal.getTime());
        // 第二天晚上两点开始执行，以后每天执行一次
        timer.schedule(new TimerTask() {
            public void run() {
                System.out.println("11232");
                Login login = new Login();
            }
        }, cal.getTime() , 24*60*1000);

    }
}
